package generadorDescriptores.test;

import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JTabbedPane;
import javax.swing.JTree;
import javax.swing.tree.DefaultMutableTreeNode;


public class UItabbed {
 
 public static void main(String[] args) {
  JFrame ventana = new JFrame();
  JTabbedPane tab = new JTabbedPane();
  
// Tree arbol = new Tree("bi");
//  
// arbol.addNode("dimensiones", arbol.getTop());
// arbol.addNode("joins", arbol.getTop());
// JTree tree = arbol.getTree();
// tree = new JTree(arbol.getTop());
  
  JTree arbol;
  DefaultMutableTreeNode bi = new DefaultMutableTreeNode("bi");
  DefaultMutableTreeNode facttable = new DefaultMutableTreeNode("facttable");
  bi.add(facttable);
  DefaultMutableTreeNode joins = new DefaultMutableTreeNode("joins");
  bi.add(joins);
  
  DefaultMutableTreeNode dimensions = new DefaultMutableTreeNode("dimensions");
  bi.add(dimensions);
  DefaultMutableTreeNode dimension1 = new DefaultMutableTreeNode("dimension1");
  dimensions.add(dimension1);
  
  arbol = new JTree(bi);
  tab.addTab("archivo1", arbol);
  tab.setAlignmentX(JComponent.CENTER_ALIGNMENT);
  tab.setAlignmentY(JComponent.CENTER_ALIGNMENT);
  
  ventana.setLocationRelativeTo(null);
  ventana.add(tab);
  ventana.pack();
  ventana.setVisible(true);
 }
}